package com.ruoyi.client.controller;

import com.ruoyi.client.BaseOpenController;
import com.ruoyi.common.constdef.ErrorDef;
import com.ruoyi.common.utils.json.JsonResult;
import com.ruoyi.system.domian.jpa.CdUserJpa;
import com.ruoyi.system.domian.service.CdUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author Dale Mao    ---多多 Email:453918229@qq.com
 * @description ClientController
 * @date 2021-01-27 13:44
 */
@Controller
@RequestMapping("/client")
public class ClientController extends BaseOpenController {

    @Autowired
    CdUserService cdUserService;

    @RequestMapping(value = "/getUser",method = RequestMethod.POST)
    @ResponseBody
    public JsonResult getUser(Long id ){
        CdUserJpa cdUserJpa=new CdUserJpa();
        cdUserJpa=cdUserService.getUserInfo(cdUserJpa);
        return new JsonResult(ErrorDef.SUCCESS,ErrorDef.MSG_SUCCESS,cdUserJpa);
    }
}
